// 备件管理
const route = {
  meta: {
    roles: ['spare_mgt'],
    title: '备件管理',
    icon: 'beijian-weixuan',
    activeIcon: 'beijian-xuanzhong',
    group: 'toolBar'
  },
  path: '/spare_parts',
  redirect: '/spare_parts/index',
  component: () => import(/* webpackChunkName: "spareParts" */ '@views/index.vue'),
  children: [
    {
      meta: {
        roles: ['spare_mgt']
      },
      path: 'index',
      name: 'SpareParts',
      component: () => import(/* webpackChunkName: "spareParts" */ '@/afterSales/views/spare/index.vue'),
      children: [
        {
          path: 'category',
          name: 'CommodityCode',
          meta: {
            title: '备件品类',
            group: 'spare',
            roles: ['spare_mgt_category']
          },
          component: () => import(/* webpackChunkName: "spareParts" */ '@/afterSales/views/spare/commodityCode/index.vue')
        },
        {
          path: 'stock',
          name: 'SparePartsStock',
          meta: {
            title: '备件库存',
            group: 'spare',
            roles: ['spare_mgt_stock']
          },
          component: () => import(/* webpackChunkName: "spareParts" */ '@/afterSales/views/spare/stock/index.vue')
        },
        {
          path: 'outboundRecord',
          name: 'OutboundRecord',
          meta: {
            title: '备件出库记录',
            group: 'spare',
            roles: ['spare_mgt_outbound']
          },
          component: () => import(/* webpackChunkName: "spareParts" */ '@/afterSales/views/spare/outboundRecord/index.vue')
        },
        {
          path: 'wareHousingRecord',
          name: 'WareHousingRecord',
          meta: {
            title: '备件入库记录',
            group: 'spare',
            roles: ['spare_mgt_inbound']
          },
          component: () => import(/* webpackChunkName: "spareParts" */ '@/afterSales/views/spare/wareHousingRecord/index.vue')
        },
        {
          path: 'houseInfo',
          name: 'HouseInfo',
          meta: {
            title: '仓库列表',
            group: 'spare',
            roles: ['spare_mgt_warehouse']
          },
          component: () => import(/* webpackChunkName: "spareParts" */ '@/afterSales/views/spare/houseInfo/index.vue')
        }
      ]
    }
  ]
}

export default route
